package com.qtenv.datasync.service.controller;


import com.qtenv.datasync.base.Result;
import com.qtenv.datasync.service.service.TerminalsXbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 小表档案表 前端控制器
 * </p>
 *
 * @author CBL
 * @since 2022-08-02
 */
@RestController
@RequestMapping("/meter")
public class TerminalsXbController {
    @Autowired
    private TerminalsXbService terminalsXbService;

    @GetMapping("/getZoneMeterList")
    public Result<?> getZoneMeterList(@RequestParam(value = "pageSize", required = false, defaultValue = "10") String pageSize,
                                      @RequestParam(value = "page", required = false, defaultValue = "1") String page,
                                      @RequestParam("tenantId") String tenantId, @RequestParam("areaId") String areaId) {
        return Result.ok(terminalsXbService.getZoneMeterList(pageSize, page, tenantId, areaId));
    }
}
